-- GENERATED SPELL FOR [Eredar Deathbringer] --


function spell0_20880(pUnit, Event) --@Forceful Cleave,n/a--
pUnit:FullCastSpellOnTarget(36787,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20880', 0, 1)
end

function spell1_20880(pUnit, Event) --@Forceful Cleave,n/a--
pUnit:FullCastSpellOnTarget(38846,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20880', 0, 1)
end

function spell2_20880(pUnit, Event) --@Unholy Aura,Self--
pUnit:FullCastSpellOnTarget(27987,pUnit)
pUnit:RegisterEvent('Sorts_20880', 0, 1)
end

function spell3_20880(pUnit, Event) --@Unholy Aura,Self--
pUnit:FullCastSpellOnTarget(38844,pUnit)
pUnit:RegisterEvent('Sorts_20880', 0, 1)
end

function Sorts_20880(pUnit, Event)
local choix_sorts_20880 = math.random(0, 3)
if choix_sorts_20880 == 0 then
pUnit:RegisterEvent('spell0_20880', 1, 1)
end
if choix_sorts_20880 == 1 then
pUnit:RegisterEvent('spell1_20880', 1, 1)
end
if choix_sorts_20880 == 2 then
pUnit:RegisterEvent('spell2_20880', 1, 1)
end
if choix_sorts_20880 == 3 then
pUnit:RegisterEvent('spell3_20880', 1, 1)
end
end

function mob20880_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20880', math.random(1500, 3000), 1)
end

function mob20880_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20880_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20880_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20880, 1, 'mob20880_Action')
RegisterUnitEvent(20880, 2, 'mob20880_Leave')
RegisterUnitEvent(20880, 3, 'mob20880_Kill')
RegisterUnitEvent(20880, 4, 'mob20880_Die')
